/*
 * @Author: 刘应元
 * @Date: 2023-04-19 14:39:44
 * @LastEditors: liuhaha
 * @LastEditTime: 2023-04-20 18:07:46
 * @Description: 人生如戏
 */
/**
 * 首页相关的接口
 */

import { ApiResponse } from '@/types/http.d';
import { default as axios } from '@/utils/request';

/**
 * 简历相关接口
 */
class HomeService {
  // 首页轮播图接口
  static getBannerInformation<T = any>() {
    return axios<ApiResponse<T>>({
      url: '/seeker-web/v1/getBannerInformation',
      method: 'get',
    });
  }
  static setlectAdvertisingAndBannerDetail<T = any>(id: any) {
    return axios<ApiResponse<T>>({
      url: `/seeker-web/v1/setlectAdvertisingAndBannerDetail/${id}`,
    });
  }
  static getAdvertisingInfo<T = any>() {
    return axios<ApiResponse<T>>({
      url: '/seeker-web/v1/getAdvertisingInfo',
      method: 'get',
    });
  }
  static pvInIncrease<T = any>() {
    return axios<ApiResponse<T>>({
      url: '/seeker-web/v1/pvInIncrease',
      method: 'post',
      params: {
        client: 'seeker_web',
      },
    });
  }

  // 求职者浏览职位详情日志记录;
  static jobViewLogIncrease<T = any>(params: any) {
    return axios<ApiResponse<T>>({
      url: '/seeker-web/v1/jobViewLogIncrease',
      method: 'post',
      params: {
        ...params,
        client: 'seeker_web',
      },
    });
  }
}

export default HomeService;
